package com.ishowcode.service.impl;

import com.ishowcode.entity.Message;
import com.ishowcode.mappers.MessageMapper;
import com.ishowcode.service.MessageInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MessageInfoServiceImpl implements MessageInfoService {
    @Resource
    MessageMapper messageMapper;
    @Override
    public List<Message> getAllMessageById(String userId) {
        return messageMapper.getAllMessageById(userId);
    }

    @Override
    public Integer addMessage(Message message) {
        return messageMapper.addMessage(message);
    }

    @Override
    public Integer deleteMessage(String messageId) {
        return messageMapper.deleteMessage(messageId);
    }
}
